package com.girl.utils;

import com.girl.entity.Result;

public class ResultUtil {

    public static Result success(Object o){
        Result result = new Result();
        result.setCode(0);
        result.setData(o);
        result.setMessage("成功");
        return result;
    }
    public static Result success(){
        return success(null);
    }
    public static Result error(int code,String message){
        Result result = new Result();
        result.setCode(code);
        result.setMessage(message);
        result.setData(null);
        return result;
    }

}
